import App from "../App";
import City from "../pages/city";
import Error from "../pages/error";
import Gonglun from "../pages/gonglun";
import Home from "../pages/home";
import My from "../pages/my";
import Shequ from "../pages/shequ";
import {createBrowserRouter} from 'react-router-dom'

export const router = createBrowserRouter([
  {
    path: "/",
    element: <App></App>,
    children:[
      {
        index:true,
        element:<Home></Home>
      },
      {
        path:'home',
        element:<Home></Home>
      },
       {
        path:'shequ',
        element:<Shequ></Shequ>
      },
       {
        path:'gonglun',
        element:<Gonglun></Gonglun>
      },
       {
        path:'my',
        element:<My></My>
      }
    ]
  },
  {
    path:"/city",
    element:<City></City>
  },
  {
    path:"*",
    element:<Error></Error>
  }
]);